# Replication Package: Causal Identification of Demographics and Current Accounts

## Overview
This folder contains all files needed to replicate the analysis in "Causal Identification of Demographics and Current Accounts." The paper applies instrumental variables, staggered difference-in-differences, synthetic control, and Bartik shift-share designs to establish causality from demographic structure to current account balances.

## Requirements
- Python 3.10+
- pandas, numpy, scipy, statsmodels
- Data files in data/processed/

## Structure
- `scripts/` — Analysis scripts (run in phase order)
- `src/` — Shared modules (PanelGLS estimator, data loading, country classifications)
- `data/processed/` — Processed panel data (causal_panel.csv, lagged_instruments.csv, bartik_instrument.csv)
- `output/tables/` — Generated output tables
- `paper/` — Paper manuscript and references

## Reproduction
Run scripts in numerical phase order:
```
python scripts/phase1_data_assembly.py
python scripts/phase2_iv_estimation.py
python scripts/phase3_staggered_did.py
python scripts/phase4_synthetic_control.py
python scripts/phase5_bartik.py
python scripts/phase6_synthesis.py
```

## Data Sources
- UN World Population Prospects 2024
- IMF World Economic Outlook
- Penn World Table 10.01
- Chinn-Ito KAOPEN Index
- Lane & Milesi-Ferretti External Wealth of Nations

## Notes
- All analysis uses the 140-country expanded panel (EBA-49 + SSA-20 + EU expansion + Tier 1 expansion)
- The `src/` modules are from the multilateral/followup project and contain the expanded country lists
- IV results are unstable but Hausman test defends OLS (p=0.41)
- BJS ATT = +5.4pp (p<0.001); Bartik p=0.004
